﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace HelpDesk.Models
{
    public class TicketStatus
    {
        private static HelpDeskDbContext _db = HelpDeskDbContext.Instance;

        public int ID { get; set; }
        public string Status { get; set; }
        public string Color { get; set; }
        public bool IsActive { get; set; }
        public List<Ticket> Tickets { get; set; }

        public static TicketStatus GetTicketByID(int intTicketStatusID)
        {
            var ticketStatus = _db.TicketStatus.Find(intTicketStatusID);
            return ticketStatus as TicketStatus;

        }
    }
}